﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="FileRepositoryDataSet" targetNamespace="http://tempuri.org/FileRepositoryDataSet.xsd" xmlns:mstns="http://tempuri.org/FileRepositoryDataSet.xsd" xmlns="http://tempuri.org/FileRepositoryDataSet.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="ClickOnceFileRepositoryConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="ClickOnceFileRepositoryConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.SqlRepositoryAdmin.Properties.Settings.GlobalReference.Default.ClickOnceFileRepositoryConnectionString" Provider="System.Data.SqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="FilesTableAdapter" GeneratorDataComponentClassName="FilesTableAdapter" Name="Files" UserDataComponentName="FilesTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="ClickOnceFileRepositoryConnectionString (Settings)" DbObjectName="ClickOnceFileRepository.dbo.Files" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>DELETE FROM [dbo].[Files] WHERE (([FileID] = @Original_FileID) AND ([FilePath] = @Original_FilePath) AND ([Modified] = @Original_Modified) AND ((@IsNull_OriginalPath = 1 AND [OriginalPath] IS NULL) OR ([OriginalPath] = @Original_OriginalPath)))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_FileID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="FileID" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_FilePath" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="FilePath" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_Modified" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="Modified" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_OriginalPath" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="OriginalPath" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_OriginalPath" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="OriginalPath" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>INSERT INTO [dbo].[Files] ([FilePath], [FileBits], [Modified], [OriginalPath]) VALUES (@FilePath, @FileBits, @Modified, @OriginalPath);
SELECT FileID, FilePath, FileBits, Modified, OriginalPath FROM Files WHERE (FileID = SCOPE_IDENTITY())</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@FilePath" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="FilePath" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Binary" Direction="Input" ParameterName="@FileBits" Precision="0" ProviderType="Image" Scale="0" Size="0" SourceColumn="FileBits" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Modified" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="Modified" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@OriginalPath" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="OriginalPath" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>SELECT FileID, FilePath, FileBits, Modified, OriginalPath FROM dbo.Files</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>UPDATE [dbo].[Files] SET [FilePath] = @FilePath, [FileBits] = @FileBits, [Modified] = @Modified, [OriginalPath] = @OriginalPath WHERE (([FileID] = @Original_FileID) AND ([FilePath] = @Original_FilePath) AND ([Modified] = @Original_Modified) AND ((@IsNull_OriginalPath = 1 AND [OriginalPath] IS NULL) OR ([OriginalPath] = @Original_OriginalPath)));
SELECT FileID, FilePath, FileBits, Modified, OriginalPath FROM Files WHERE (FileID = @FileID)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@FilePath" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="FilePath" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Binary" Direction="Input" ParameterName="@FileBits" Precision="0" ProviderType="Image" Scale="0" Size="0" SourceColumn="FileBits" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Modified" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="Modified" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@OriginalPath" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="OriginalPath" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_FileID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="FileID" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_FilePath" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="FilePath" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_Modified" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="Modified" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_OriginalPath" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="OriginalPath" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_OriginalPath" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="OriginalPath" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="FileID" ColumnName="FileID" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@FileID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="FileID" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="FileID" DataSetColumn="FileID" />
              <Mapping SourceColumn="FilePath" DataSetColumn="FilePath" />
              <Mapping SourceColumn="FileBits" DataSetColumn="FileBits" />
              <Mapping SourceColumn="Modified" DataSetColumn="Modified" />
              <Mapping SourceColumn="OriginalPath" DataSetColumn="OriginalPath" />
            </Mappings>
            <Sources />
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="FileRepositoryDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="FileRepositoryDataSet" msprop:Generator_UserDSName="FileRepositoryDataSet">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="Files" msprop:Generator_TableClassName="FilesDataTable" msprop:Generator_TableVarName="tableFiles" msprop:Generator_TablePropName="Files" msprop:Generator_RowDeletingName="FilesRowDeleting" msprop:Generator_UserTableName="Files" msprop:Generator_RowChangingName="FilesRowChanging" msprop:Generator_RowEvHandlerName="FilesRowChangeEventHandler" msprop:Generator_RowDeletedName="FilesRowDeleted" msprop:Generator_RowEvArgName="FilesRowChangeEvent" msprop:Generator_RowChangedName="FilesRowChanged" msprop:Generator_RowClassName="FilesRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="FileID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnFileID" msprop:Generator_ColumnPropNameInRow="FileID" msprop:Generator_ColumnPropNameInTable="FileIDColumn" msprop:Generator_UserColumnName="FileID" type="xs:int" />
              <xs:element name="FilePath" msprop:Generator_ColumnVarNameInTable="columnFilePath" msprop:Generator_ColumnPropNameInRow="FilePath" msprop:Generator_ColumnPropNameInTable="FilePathColumn" msprop:Generator_UserColumnName="FilePath">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="256" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="FileBits" msprop:Generator_ColumnVarNameInTable="columnFileBits" msprop:Generator_ColumnPropNameInRow="FileBits" msprop:Generator_ColumnPropNameInTable="FileBitsColumn" msprop:Generator_UserColumnName="FileBits" type="xs:base64Binary" />
              <xs:element name="Modified" msprop:Generator_ColumnVarNameInTable="columnModified" msprop:Generator_ColumnPropNameInRow="Modified" msprop:Generator_ColumnPropNameInTable="ModifiedColumn" msprop:Generator_UserColumnName="Modified" type="xs:dateTime" />
              <xs:element name="OriginalPath" msprop:Generator_ColumnVarNameInTable="columnOriginalPath" msprop:Generator_ColumnPropNameInRow="OriginalPath" msprop:Generator_ColumnPropNameInTable="OriginalPathColumn" msprop:Generator_UserColumnName="OriginalPath" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="256" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Files" />
      <xs:field xpath="mstns:FileID" />
    </xs:unique>
  </xs:element>
</xs:schema>